﻿


@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<title>Demo</title>
	<!-- 请勿在项目正式环境中引用该 layui.css 地址 -->
	<link href="//unpkg.com/layui@2.9.20/dist/css/layui.css" rel="stylesheet" />
</head>
<body class="layui-padding-3">
	<table class="layui-hide" id="ID-treeTable-demo"></table>
	  <div style="float: right;margin-right: 10px;" class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="formDemo" onclick="ProductAdd()">添加</button>
        <button onclick="closeNow()" class="layui-btn layui-btn-danger">关闭</button>
    </div>
	<!-- 请勿在项目正式环境中引用该 layui.js 地址 -->
	<script src="//unpkg.com/layui@2.9.20/dist/layui.js"></script>
    <script src="//unpkg.com/jquery/dist/jquery.js"></script>
	<script>
 
		 var $ = layui.jquery;
        var form = layui.form;
         layui.use('table', function () {
             var table = layui.table;
			layer = layui.layer;
            // 获取分页参数
			var pageIndex = 1;
			var pageSize = 4;
        // 渲染函数，将查询操作封装在里面，方便点击查询按钮时调用
        function renderTable() {
            // 渲染
            var inst = table.render({
                elem: '#ID-treeTable-demo',
                // 拼接上分页参数到URL
                url: '@ViewBag.GlennQuigmrire' + '/api/Products/GetSearchProducts?PageIndex=' + pageIndex + '&PageSize=' + pageSize,
                maxHeight: '501px',
                toolbar: '#TPL-treeTable-demo',
                cols: [[
                    {type: 'radio', title: '😊', fixed: true}, // 单选框
                    { field: 'productNumber', title: '产品编号', width: 180, fixed: 'left' },
                    { field: 'productName', title: '产品名称', width: 120 },
                    { field: 'productSpecification', title: '产品规格', width: 100 },
                    { field: 'createDate', title: '创建时间', width: 180, sort: true },
                    { field: 'createName', title: '创建人', width: 180, },
                ]],
                // page: true,

            });
        };
    });
		
        // 关闭弹出层
    function closeNow() {
        parent.layer.close(parent.layer.getFrameIndex(window.name)); // 关闭当前弹出层
    }
		
	</script>
</body>
</html>








